/********************************************************************************
	city_analysis.do
	
	This file produces all of the results provided in 
	The Political Resource Blessing or Curse?
	Patronage Networks, Infrastructure Investment, and
	Economic Development in China
	Author: Zhenhuan Lei
	Date:2022/08/25
	Program: Stata 17 MP
	Environment: Win 11
	
*********************************************************************************/


* Please run the following codes first to set up the environment

	use infrastructure_use.dta, clear
	set matsize 11000

	global var_balance pop_mi population_gr_c unemp gdp_growth_c gdp_percapita_c gdp_primaryshare_c gdp_secondary_c gdp_tertiary_c rev_per exp_per fixinv_per export import road_inv_per
	
* Table 1 *

	eststo clear
	foreach varx of var $var_balance {
		eststo: qui areg `varx' treat09 if year == 2007, a(pro_code) cluster(pro_code)
	}
	esttab, b(3) p(3) star(* 0.1 ** 0.05 *** 0.01) keep(treat09) replace
	
	eststo clear
	foreach varx of var $var_balance {
		eststo: qui areg `varx' treat09 if year <= 2007, a(pro_year) cluster(pro_code)
	}
	esttab, b(3) p(3) star(* 0.1 ** 0.05 *** 0.01) keep(treat09) replace	

* Figure 1 *

	* ssc install binscatter, replace 
	binscatter road_inv_per year, by(treat09) line(connect) ///
		xlabel(#14) xline(2007.5, lp(dash)) legend(off) ///
		colors(maroon eltblue) msymbol(O T) ///
		text(570 2015 "Connected cities", color(eltblue)) ///
		text(400 2014 "Unconnected cities", color(maroon)) ///
		xtitle(Year) ///
		ytitle("Investment in roads & bridges per capita (Yuan)") ///
		scheme(cleanplots) 
	
* Table 2 *

	xtset cityID year
	eststo clear
	eststo: qui xtreg lroad_inv_per main_treat i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)		
	
* Figure 2 *

	xtreg lroad_inv_per 1.treat09##ib2004.year c03y* i.pro_year if ///
		year > 2003, fe cluster(cityID)
	coefplot, keep(1.treat09#*.year) ///
		coeflabels(1.treat09#2004.year = "2004" ///
		1.treat09#2005.year = "2005" ///
		1.treat09#2006.year = "2006" ///
		1.treat09#2007.year = "2007" /// 
		1.treat09#2008.year = "2008" /// 
		1.treat09#2009.year = "2009" /// 
		1.treat09#2010.year = "2010" /// 
		1.treat09#2011.year = "2011" /// 
		1.treat09#2012.year = "2012" /// 
		1.treat09#2013.year = "2013" /// 
		1.treat09#2014.year = "2014" /// 
		1.treat09#2015.year = "2015" /// 
		1.treat09#2016.year = "2016") ///
		xtitle(Year) ///
		ytitle(Effect of connections on Infrastructure Investment) ///
		levels(90) ///
		vertical ///
		yline(0, lp(dash)) ///
		xline(3.5, lp(dash)) ///
		addplot(line @b @at) ///
		ciopts(recast(rcap)) ///
		graphregion(color(gs16)) ///
		ylabel(#5, nogrid) ///
		scheme(s2mono)		

* Table 3 *

	eststo clear
	eststo: qui xtreg G10_infrastructure main_treat i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_infrastructure main_treat c03t* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_infrastructure main_treat c03a* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_infrastructure main_treat c03y* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_development main_treat i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_development main_treat c03t* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_development main_treat c03a* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_development main_treat c03y* i.pro_year, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat)
	
* Table 5 *

	eststo clear
	eststo: qui areg bindex1 treat09 i.year, a(pro_code) cluster(pro_code)
	eststo: qui areg bindex1 treat09 c07* i.year, a(pro_code) cluster(pro_code)
	eststo: qui areg bindex1 treat07 i.year, a(pro_code) cluster(pro_code)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) drop(c07* *.year _cons)	
	
* Table 6 *

	eststo clear
	eststo: qui xtreg center_gdp main_treat placebo07 i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg center_gdp main_treat placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg local_gdp main_treat placebo07 i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg local_gdp main_treat placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg domloan_gdp main_treat placebo07 i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg domloan_gdp main_treat placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)
	
* Table A1 *

	su road_inv_per G10_infrastructure G10_development G10_politics G10_welfare ///
		center_gdp local_gdp domloan_gdp loan_per bond_gdp gdp_primaryshare_c ///
		gdp_secondary_c gdp_tertiary_c gdpper_sec1 gdpper_sec2 gdpper_sec3 ///
		domestic_ave hmt_ave foreign_ave bindex1 if year> 2003
	su treat09 treat07 export_shock export_dependence0507 c03_pop_mi ///
		c03_population_gr_c c03_unemp c03_gdp_growth_c c03_gdp_percapita_c ///
		c03_gdp_primaryshare_c c03_gdp_secondary_c c03_gdp_tertiary_c ///
		c03_rev_per c03_exp_per c03_fixinv_per if year == 2009
	
* Figure B1 *

	reg road_inv_per treat09##ib2003.year, vce(cluster cityID)
	coefplot, keep(1.treat09#*.year) ///
		coeflabels(1.treat09#2004.year = "2004" ///
		1.treat09#2005.year = "2005" ///
		1.treat09#2006.year = "2006" ///
		1.treat09#2007.year = "2007" /// 
		1.treat09#2008.year = "2008" /// 
		1.treat09#2009.year = "2009" /// 
		1.treat09#2010.year = "2010" /// 
		1.treat09#2011.year = "2011" /// 
		1.treat09#2012.year = "2012" /// 
		1.treat09#2013.year = "2013" /// 
		1.treat09#2014.year = "2014" /// 
		1.treat09#2015.year = "2015" /// 
		1.treat09#2016.year = "2016") ///
		xtitle(Year) ///
		ytitle(Difference of infrastracture investment compared to 2003) ///
		levels(90) ///
		vertical ///
		yline(0, lp(dash)) ///
		xline(4.5, lp(dash)) ///
		addplot(line @b @at) ///
		ciopts(recast(rcap)) ///
		graphregion(color(gs16)) ///
		ylabel(#5, nogrid) ///
		scheme(s2mono)		
	
* Table B1 *

	eststo clear
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2004.year i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2004.year c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2004.year c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2004.year c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(1.treat09#*.year)
	
* Table B2 *

	eststo clear
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2007.year i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2007.year c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2007.year c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat09##ib2007.year c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(1.treat09#*.year)	
	
* Table B3 *

	eststo clear
	eststo: qui xtreg lroad_inv_per main_treat i.pro_year if year > 2003 & fsj == 0, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03t* i.pro_year if year > 2003 & fsj == 0, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03a* i.pro_year if year > 2003 & fsj == 0, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03y* i.pro_year if year > 2003 & fsj == 0, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per placebo07 c03y* i.pro_year if year > 2003 & fsj == 0, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Table B4 *

	* ssc install reghdfe, replace
	eststo clear	
	eststo: qui reghdfe lroad_inv_per main_treat if year > 2003, a(i.cityID##c.year pro_year) cluster(cityID)
	eststo: qui reghdfe lroad_inv_per main_treat c03t* if year > 2003, a(i.cityID##c.year pro_year) cluster(cityID)
	eststo: qui reghdfe lroad_inv_per main_treat c03a* if year > 2003, a(i.cityID##c.year pro_year) cluster(cityID)
	eststo: qui reghdfe lroad_inv_per placebo07 c03a* if year > 2003, a(i.cityID##c.year pro_year) cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	

* Table B5 *

	eststo clear
	eststo: qui xtreg road_inv_per main_treat i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_per main_treat c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_per main_treat c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_per main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_per placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Table B6 *

	eststo clear
	eststo: qui xtreg lroad_inv main_treat i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv main_treat c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv main_treat c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Table B7 *

	eststo clear
	eststo: qui xtreg road_inv_gdp main_treat i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_gdp main_treat c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_gdp main_treat c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_gdp main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg road_inv_gdp placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)		
	
* Table B8 *

	capture drop after2012 after2013 after2014
	gen after2012 = (year >= 2012)
	gen after2013 = (year >= 2013) 
	gen after2014 = (year >= 2014)
	
	eststo clear
	eststo: qui xtreg lroad_inv_per 1.treat2012#1.after2012 i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat2012#1.after2012 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat2013#1.after2013 i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat2013#1.after2013 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat2014#1.after2014 i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per 1.treat2014#1.after2014 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(1.treat2012#1.after2012 1.treat2013#1.after2013 1.treat2014#1.after2014)	
	
* Table B9 *

	eststo clear
	eststo: qui xtreg G10_infrastructure placebo07 i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_infrastructure placebo07 c03y* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_development placebo07 i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_development placebo07 c03y* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_politics main_treat i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_politics main_treat c03y* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_welfare main_treat i.pro_year, fe cluster(cityID)
	eststo: qui xtreg G10_welfare main_treat c03y* i.pro_year, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Table B10 *

	eststo clear
	eststo: qui xtreg G10_infrastructure main_treat i.pro_year if year <2010, fe cluster(cityID)
	eststo: qui xtreg G10_infrastructure main_treat c03y* i.pro_year if year <2010, fe cluster(cityID)
	eststo: qui xtreg G10_development main_treat i.pro_year if year <2010, fe cluster(cityID)
	eststo: qui xtreg G10_development main_treat c03y* i.pro_year if year <2010, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat)	
	
* Table B11 *

	eststo clear
	eststo: qui xtreg lroad_inv_per main_treat i.treat09 i.after2 if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03t* i.treat09 i.after2 if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03a* i.treat09 i.after2 if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03y* i.treat09 i.after2 if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per placebo07 c03y* i.treat09 i.after2 if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Table B12 *

	eststo clear
	eststo: qui xtreg lroad_inv_per main_treat connected i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat connected c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat connected c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat connected c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per placebo07 connected c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) scalars(N_clust) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07 connected)		

* Table B13 *
	
	capture drop external_pps
	gen external_pps = (pro_code != 37 & pro_code != 42 & pro_code != 61)
	eststo clear
	eststo: qui xtreg lroad_inv_per main_treat i.pro_year if year > 2003 & external_pps == 1, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03t* i.pro_year if year > 2003 & external_pps == 1, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03a* i.pro_year if year > 2003 & external_pps == 1, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat c03y* i.pro_year if year > 2003 & external_pps == 1, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per placebo07 c03y* i.pro_year if year > 2003 & external_pps == 1, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)
	
* Table C1 *

	global PS_cont PS_age PS_gender2 PS_race8 PS_c_edu PS_c_central_exp ///
		PS_c_soe_exp PS_c_univ_exp PS_c_league PS_c_finance ps_conn_home ///
		ps_conn_college ps_conn_work
	global mayor_cont Mayor_age mayor_gender2 mayor_race6 Mayor_c_edu ///
		Mayor_c_central_exp Mayor_c_soe_exp Mayor_c_univ_exp Mayor_c_league ///
		Mayor_c_finance mayor_conn_home mayor_conn_college mayor_conn_work	
		
	eststo clear
	foreach varx of var $PS_cont {
		eststo: qui areg `varx' ps_conn_prom if year == 2009 | year == 2008, ///
		a(pro_year) cluster(pro_code)
	}
	esttab, b(3) p(3) star(* 0.1 ** 0.05 *** 0.01) keep(ps_conn_prom) replace
	
	eststo clear
	foreach varx of var $mayor_cont {
		eststo: qui areg `varx' mayor_conn_prom if year == 2008 | year == 2009, ///
		a(pro_year) cluster(pro_code)
	}
	esttab, b(3) p(3) star(* 0.1 ** 0.05 *** 0.01) keep(mayor_conn_prom) replace
	
* Table C2 *

	eststo clear
	foreach varx of var $PS_cont {
		eststo: qui areg `varx' ps_conn_prom i.year if year == 2007, ///
		a(pro_code) cluster(pro_code)
	}
	esttab, b(3) p(3) star(* 0.1 ** 0.05 *** 0.01) keep(ps_conn_prom) replace	
	
	eststo clear
	foreach varx of var $mayor_cont {
		eststo: qui areg `varx' mayor_conn_prom i.year if year == 2007, ///
		a(pro_code) cluster(pro_code)
	}
	esttab, b(3) p(3) star(* 0.1 ** 0.05 *** 0.01) keep(mayor_conn_prom) replace
	
* Table C3 *

	global leader_test08 c.ps_age08#1.after2 c.mayor_age08#1.after2 ///
		1.ps_edu08#1.after2  1.mayor_edu08#1.after2
	global leader_test09 c.ps_age09#1.after2 c.mayor_age09#1.after2 ///
		1.ps_edu09#1.after2  1.mayor_edu09#1.after2
	global leader_test c.ps_age09#1.after2 c.ps_age08#1.after2 ///
		c.mayor_age09#1.after2 c.mayor_age08#1.after2 1.ps_edu09#1.after2 ///
		1.ps_edu08#1.after2 1.mayor_edu09#1.after2 1.mayor_edu08#1.after2
	
	eststo clear
	eststo: qui xtreg lroad_inv_per main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat $leader_test08 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat $leader_test09 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per main_treat $leader_test08 $leader_test09 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) drop(*.pro_year c03y* _cons)	

* Table C4 *

	eststo clear
	eststo: reghdfe lroad_inv_per main_treat c03a* if year > 2003, ///
		a(cityID pro_year) cluster(cityID)
	eststo: reghdfe lroad_inv_per main_treat c03a* if year > 2003, ///
		a(Mayor_leaderindex cityID pro_year) cluster(cityID)
	eststo: reghdfe lroad_inv_per main_treat c03a* if year > 2003, ///
		a(PS_leaderindex cityID pro_year) cluster(cityID)
	eststo: reghdfe lroad_inv_per main_treat c03a* if year > 2003, ///
		a(Mayor_leaderindex PS_leaderindex cityID pro_year) cluster(cityID)
	esttab, se b(3) t(3) scalars(N_clust) star(* 0.1 ** 0.05 *** 0.01) ///
		keep(main_treat)	

* Table C5 *

	eststo clear
	eststo: qui xtreg connected main_treat i.pro_year if year > 2003, ///
		fe cluster(cityID)
	eststo: qui xtreg connected main_treat c03y* i.pro_year if year > 2003, ///
		fe cluster(cityID)	
	eststo: qui xtreg connected main_treat i.pro_year if year > 2003 & ///
		year != 2008 & year != 2009, fe cluster(cityID)
	eststo: qui xtreg connected main_treat c03y* i.pro_year if year > 2003 & ///
		year != 2008 & year != 2009, fe cluster(cityID)
	esttab, se b(3) t(3) scalars(N_clust) star(* 0.1 ** 0.05 *** 0.01) ///
		keep(main_treat)			

* Table C6 *

	eststo clear
	eststo: qui areg treat09 export_shock if year == 2007, a(pro_code) ///
		vce(cluster pro_code)
	eststo: qui areg treat09 export_shock c07* if year == 2007, a(pro_code) ///
		vce(cluster pro_code)
	eststo: qui areg treat09 export_dependence0507 if year == 2007, ///
		a(pro_code) vce(cluster pro_code)
	eststo: qui areg treat09 export_dependence0507 c07* if year == 2007, ///
		a(pro_code) vce(cluster pro_code)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) drop(c07* _cons)		
	
* Table D1 *

	eststo clear
	eststo: qui xtreg lroad_inv_per ib0.main_treat2##1.after2 i.pro_year, fe cluster(cityID)
	test 1.main_treat2#1.after2 = 2.main_treat2#1.after2 = 3.main_treat2#1.after2
	eststo: qui xtreg lroad_inv_per ib0.main_treat2##1.after2 c03t* i.pro_year, fe cluster(cityID)
	test 1.main_treat2#1.after2 = 2.main_treat2#1.after2 = 3.main_treat2#1.after2
	eststo: qui xtreg lroad_inv_per ib0.main_treat2##1.after2 c03a* i.pro_year, fe cluster(cityID)
	test 1.main_treat2#1.after2 = 2.main_treat2#1.after2 = 3.main_treat2#1.after2
	eststo: qui xtreg lroad_inv_per ib0.main_treat2##1.after2 c03y* i.pro_year, fe cluster(cityID)
	test 1.main_treat2#1.after2 = 2.main_treat2#1.after2 = 3.main_treat2#1.after2
	esttab, se b(3) t(3) scalars(N_clust) star(* 0.1 ** 0.05 *** 0.01) keep(*.main_treat2#1.after2)
	
* Table D2 *

	eststo clear
	eststo: qui xtreg lroad_inv_per ib0.main_treat3##1.after2 i.pro_year, fe cluster(cityID)
	test 2.main_treat3#1.after2 = 3.main_treat3#1.after2
	eststo: qui xtreg lroad_inv_per ib0.main_treat3##1.after2 c03t* i.pro_year, fe cluster(cityID)
	test 2.main_treat3#1.after2 = 3.main_treat3#1.after2
	eststo: qui xtreg lroad_inv_per ib0.main_treat3##1.after2 c03a* i.pro_year, fe cluster(cityID)
	test 2.main_treat3#1.after2 = 3.main_treat3#1.after2
	eststo: qui xtreg lroad_inv_per ib0.main_treat3##1.after2 c03y* i.pro_year, fe cluster(cityID)
	test 2.main_treat3#1.after2 = 3.main_treat3#1.after2
	esttab, se b(3) t(3) scalars(N_clust) star(* 0.1 ** 0.05 *** 0.01) keep(*.main_treat3#1.after2)	
	
* Figure D1 *

	qui xtreg lroad_inv_per 3.main_treat3##ib2004.year c03y* i.pro_year if main_treat3 != 2 & year > 2003, fe cluster(cityID)
	coefplot, keep(3.main_treat3#*.year) ///
		coeflabels(3.main_treat3#2004.year = " " ///
		3.main_treat3#2005.year = " " ///
		3.main_treat3#2006.year = " " ///
		3.main_treat3#2007.year = " " /// 
		3.main_treat3#2008.year = "2008" /// 
		3.main_treat3#2009.year = " " /// 
		3.main_treat3#2010.year = " " /// 
		3.main_treat3#2011.year = " " /// 
		3.main_treat3#2012.year = " " /// 
		3.main_treat3#2013.year = " " /// 
		3.main_treat3#2014.year = " " /// 
		3.main_treat3#2015.year = " " /// 
		3.main_treat3#2016.year = " ") ///
		levels(90) ///
		vertical ///
		yline(0, lp(dash)) ///
		xline(3.5, lp(dash)) ///
		addplot(line @b @at) ///
		ciopts(recast(rcap)) ///
		graphregion(color(gs16)) ///
		ylabel(#5, nogrid) ///
		scheme(s2mono)
	qui xtreg lroad_inv_per 2.main_treat3##ib2004.year c03y* i.pro_year if main_treat3 != 3 & year > 2003, fe cluster(cityID)
	coefplot, keep(2.main_treat3#*.year) ///
		coeflabels(2.main_treat3#2004.year = " " ///
		2.main_treat3#2005.year = " " ///
		2.main_treat3#2006.year = " " ///
		2.main_treat3#2007.year = " " /// 
		2.main_treat3#2008.year = "2008" /// 
		2.main_treat3#2009.year = " " /// 
		2.main_treat3#2010.year = " " /// 
		2.main_treat3#2011.year = " " /// 
		2.main_treat3#2012.year = " " /// 
		2.main_treat3#2013.year = " " /// 
		2.main_treat3#2014.year = " " /// 
		2.main_treat3#2015.year = " " /// 
		2.main_treat3#2016.year = " ") ///
		levels(90) ///
		vertical ///
		yline(0, lp(dash)) ///
		xline(4.5, lp(dash)) ///
		addplot(line @b @at) ///
		ciopts(recast(rcap)) ///
		graphregion(color(gs16)) ///
		ylabel(#5, nogrid) ///
		scheme(s2mono)		
	
* Table D3 *	
	
	eststo clear
	eststo: qui xtreg lroad_inv_per ib0.main_treat##ib1.new_cl0809 i.pro_year, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per ib0.main_treat##ib1.new_cl0809 c03t* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per ib0.main_treat##ib1.new_cl0809 c03a* i.pro_year, fe cluster(cityID)
	eststo: qui xtreg lroad_inv_per ib0.main_treat##ib1.new_cl0809 c03y* i.pro_year, fe cluster(cityID)
	esttab, se b(3) t(3) scalars(N_clust) star(* 0.1 ** 0.05 *** 0.01) keep(1.main_treat 1.main_treat#0.new_cl0809)
	
* Table E1 *
	
	* These are the group of control variables that leav out economic indicators (which are the outcome variables here)
	global cont1_03t c03t_pop_mi c03t_population_gr_c c03t_unemp c03t_rev_per c03t_exp_per c03t_fixinv_per
	global cont1_03a c03a_pop_mi c03a_population_gr_c c03a_unemp c03a_rev_per c03a_exp_per c03a_fixinv_per
	global cont1_03y c03y_pop_mi* c03y_population_gr_c* c03y_unemp* c03y_rev_per* c03y_exp_per* c03y_fixinv_per*

	eststo clear
	eststo: qui xtreg gdp_secondary_c main_treat placebo07 i.pro_year if year > 2003, fe cluster(cityID)	
	eststo: qui xtreg gdp_secondary_c main_treat placebo07 $cont1_03t i.pro_year if year > 2003, fe cluster(cityID)	
	eststo: qui xtreg gdp_secondary_c main_treat placebo07 $cont1_03a i.pro_year if year > 2003, fe cluster(cityID)	
	eststo: qui xtreg gdp_secondary_c main_treat placebo07 $cont1_03y i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg gdp_primaryshare_c main_treat placebo07 $cont1_03y i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg gdp_tertiary_c main_treat placebo07 $cont1_03y i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Table E2 *

	eststo clear
	eststo: qui xtreg lgdpper_sec1 main_treat placebo07 i.pro_year if year > 2003, fe cluster(cityID)	
	eststo: qui xtreg lgdpper_sec1 main_treat placebo07 $cont1_03y i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lgdpper_sec2 main_treat placebo07 i.pro_year if year > 2003, fe cluster(cityID)	
	eststo: qui xtreg lgdpper_sec2 main_treat placebo07 $cont1_03y i.pro_year if year > 2003, fe cluster(cityID)	
	eststo: qui xtreg lgdpper_sec3 main_treat placebo07 i.pro_year if year > 2003, fe cluster(cityID)	
	eststo: qui xtreg lgdpper_sec3 main_treat placebo07 $cont1_03y i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Table F1 *

	eststo clear
	eststo: qui xtreg ldomestic_ave main_treat placebo07 i.pro_year if year>2003, fe cluster(cityID)
	eststo: qui xtreg ldomestic_ave main_treat placebo07 c03y* i.pro_year if year>2003, fe cluster(cityID)
	eststo: qui xtreg lhmt_ave main_treat placebo07 i.pro_year if year>2003, fe cluster(cityID)
	eststo: qui xtreg lhmt_ave main_treat placebo07 c03y* i.pro_year if year>2003, fe cluster(cityID)
	eststo: qui xtreg lforeign_ave main_treat placebo07 i.pro_year if year>2003, fe cluster(cityID)
	eststo: qui xtreg lforeign_ave main_treat placebo07 c03y* i.pro_year if year>2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)
	
* Table H1 *

	eststo clear
	eststo: qui xtreg lloan_per main_treat i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lloan_per main_treat c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lloan_per main_treat c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lloan_per main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg lloan_per placebo07 c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg ldeposit_per main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)	
	
* Figure H1 *

	binscatter bond_gdp year, line(connect) ///
		xlabel(#14) xline(2009.5, lp(dash)) legend(off) ///
		colors(eltblue) msymbol(T) ///
		xtitle(Year) ///
		ytitle("City Bonds as share of GDP (%)") ///
		scheme(cleanplots) 	
		
* Table H2 *

	eststo clear
	eststo: qui xtreg bond_gdp main_treat i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg bond_gdp main_treat c03t* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg bond_gdp main_treat c03a* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg bond_gdp main_treat c03y* i.pro_year if year > 2003, fe cluster(cityID)
	eststo: qui xtreg bond_gdp placebo07 c03y* i.year if year > 2003, fe cluster(cityID)
	esttab, se b(3) t(3) scalars(N_clust) star(* 0.1 ** 0.05 *** 0.01) keep(main_treat placebo07)		
	
	
	
	
	
	